import sys

from PyQt5.QtWebEngineWidgets import QWebEngineView

from PyQt5.QtCore import QUrl

from PyQt5.QtWidgets import QMainWindow, QApplication

class MainWindowHtml(QMainWindow):

    def __init__(self):

        super().__init__()

        self.setWindowTitle('智能科学与技术岗位分析')

        self.setGeometry(5, 30, 1355, 730)
        

        self.browser = QWebEngineView()

# 加载外部页面
        # url = 'http://www.baidu.com'
        url = 'http://127.0.0.1:5000/index'

        self.browser.load(QUrl(url))

        self.setCentralWidget(self.browser)

# if __name__ == '__main__':
#
#     app = QApplication(sys.argv)
#
#     win = MainWindowHtml()
#
#     win.show()
#
#     sys.exit(app.exec_())